*all analyses done using Stata/SE 18.5

clear all
use "CPS cities under siege data.dta" , replace

*Table 1 is 2x2 of approaches
*Figure 1
hist approaches, percent
*Table 2
corr siege blitz conventional guerrilla
*Figure 2
count if siege==1 & relativestrength==0
count if siege==1 & relativestrength==1
count if siege==1 & relativestrength==2
count if siege==1 & relativestrength==3
count if siege==1 & relativestrength==4
*Table 4
tab rebvic siege, chi
*Figure 3
lowess rebvic siege, adjust jitter(8)
*Table 5, Model 1
probit rebvic siege blitz divide camp nyr*, cluster (dyadid)
*Table 5, Model 2
probit rebvic siege blitz divide camp relativestrength loggdppc goalchange logarea  logpop nyr* , cluster (dyadid)
*Table 5, Model 3
probit rebvic siege blitz divide camp relativestrength loggdppc goalchange logarea  logpop nyr* , cluster (dyadid) vce(jackknife)
*Table 5, Model 4
firthlogit rebvic siege blitz divide camp relativestrength loggdppc goalchange logarea  logpop nyr*  
*Table 5, Model 5
reg  rebvic siege blitz divide camp relativestrength loggdppc goalchange logarea  logpop nyr* i.dyadid, cluster (ccode)
*Table 5, Model 6
set seed 123456789
bootstrap _b, reps(1000): probit rebvic siege blitz divide camp relativestrength loggdppc logarea logpop imr nyr* , cluster (dyadid)